package com.nhjf.model.teachers;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.coursesSeries.CoursesSeries;
import com.nhjf.model.system.User;

@SuppressWarnings("serial")
@Entity
@Table(name = "recentlyStudied")
public class RecentlyStudied extends BaseModel{
	/**
	 * 主键ID
	 */
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "native")
	@Column(name = "id", unique = true)
	private Long id;
	/**
	 * 系列课程id
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "coursesId")
	private CoursesSeries courses;
	/**
	 * 当前登陆用户id
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userId")
	private User user;
	/**
	 * 老师id
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "teacherId")
	private Teacher teacher;
	/**
	 * 最近学习时间
	 */
	@Column(name = "recentLearnTime")
	private Date recentLearnTime;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	public CoursesSeries getCourses() {
		return courses;
	}

	public void setCourses(CoursesSeries courses) {
		this.courses = courses;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Teacher getTeacher() {
		return teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	public Date getRecentLearnTime() {
		return recentLearnTime;
	}

	public void setRecentLearnTime(Date recentLearnTime) {
		this.recentLearnTime = recentLearnTime;
	}
	
	
}
